package top.zhangjianyong.tools.factory;

import top.zhangjianyong.tools.entity.User;
import top.zhangjianyong.tools.parm.UserRegParm;

/**
 * @author ： zhangjianyong
 * @date ： 2021/11/1 15:42
 */
public class UserFactory {
    public static User create() {
        return new User();
    }

    public static User create(UserRegParm userRegParm) {
        User user = create();
        user.setUsername(userRegParm.getUsername());
        user.setPassword(userRegParm.getPassword());
        user.setEmail(userRegParm.getEmail());
        return user;
    }
}
